<%@ page language="java" contentType="text/html; charset=utf-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link rel="stylesheet"
	href="http://cdn.static.runoob.com/libs/bootstrap/3.3.7/css/bootstrap.min.css">
<script
	src="http://cdn.static.runoob.com/libs/jquery/2.1.1/jquery.min.js"></script>
<script
	src="http://cdn.static.runoob.com/libs/bootstrap/3.3.7/js/bootstrap.min.js"></script>

<title>Insert title here</title>

<script type="text/javascript">
	function isEqualPassword() {
		var username = document.getElementById("login_username");
		var password1 = document.getElementById("login_password").value;
		var password2 = document.getElementById("login_password_1").value;
		var email = document.getElementById("login_email");
		var birthday = document.getElementById("login_birthday");
		var tel = document.getElementById("login_tel");
		if (password1 != password2) {
			alert("前后密码不一致，请确认后在提交" + password1);
			return false;
		} else if (email == "" || birthday == "" || tel.length == ""
				|| username.length == "" || password1 == "") {
			alert("填写信息不完整，请确认是否填写完整！");
			return false;
		} else {
			return true;
		}
	}
</script>
</head>
<body>
	<div>
		<!-- 主体 -->
		<div>
			<center>
				<b>重庆旅游</b>
			</center>
			<!-- 上层 -->
		</div>
		<div>
			<!-- 提交部分 -->
			<form action="" onsubmit="return isEqualPassword()">
				<table>
					<tr>
						<td><label class="col-sm-2 control-label">用户注册</label></td>
					</tr>
					<tr>
						<td><label  class="col-sm-2 control-label">用户名</label></td>
						<td><input type="text" id="login_username" class="form-control" name="username"></td>
					</tr>
					<tr>
						<td><label class="col-sm-2 control-label">密码</label></td>
						<td><input type="password" id="login_password" class="form-control" name="password"></td>
					</tr>
					<tr>
						<td><label  class="col-sm-2 control-label">确认密码</label></td>
						<td><input type="password" id="login_password_1" class="form-control" name="password_1"></td>
					</tr>
					<tr>
						<td><label class="col-sm-2 control-label">性别</label></td>
						<td><label class="checkbox-inline"><input type="radio" name="sex" value="male" checked>男</label></td>
						<td><label class="checkbox-inline"><input type="radio" name="sex" value="female">女</label></td>
					</tr>
					<tr>
						<td><label class="col-sm-2 control-label">出生日期</label></td>
						<td><input type="text" id="login_birthday" class="form-control" name="birthday"></td>
					</tr>
					<tr>
						<td><label class="col-sm-2 control-label">邮箱</label></td>
						<td><input type="text" id="login_email" class="form-control" name="email"></td>
					</tr>
					<tr>
						<td><label class="col-sm-2 control-label">电话</label></td>
						<td><input type="text" id="login_tel" class="form-control" name="tel"></td>
					</tr>
					<tr>
						<td><input type="submit" name="login" class="btn btn-primary btn-lg" value="注册"></td>
					</tr>
				</table>
			</form>
		</div>
		<div>
			<!-- 底部信息 -->
			<p>
				<b color:#ff0000="">2017 王俊杰 唐朋 朱淑芳.</b>
			</p>
		</div>
	</div>


</body>
</html>